Skip to content

fix(desktop): show whether you can mention or invite an agent - #7239

Draft
loganj wants to merge 4 commits into
fix/mention-picker-stack-5bd14d7a-5from
fix/mention-publication-01594460-6
Draft

fix(desktop): show whether you can mention or invite an agent#7239
loganj wants to merge 4 commits into
fix/mention-picker-stack-5bd14d7a-5from
fix/mention-publication-01594460-6

Conversation

@loganj

@loganj loganj commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

🤖

Summary

The @ mention list now tells you, live, whether each person can actually be mentioned — and lets you retry when a check fails.

  • Every row shows its current status: "Member · Mention" (you can mention them), "Invite…", "Checking access…", or "Unavailable" (with the reason and presence shown). Before, members whose access was denied or still being checked looked like everyone else.
  • Statuses update in place. A row that finishes its check switches from "Checking access…" to "Member · Mention" or "Unavailable" without replacing any identity, label, or order — and without moving your selected row.
  • Retry is explicit and fresh. An "Unavailable" row has a Retry button that starts a new access check; it never recycles an old answer.
  • Access answers expire. A verification is keyed to the request that asked for it and expires after five seconds, so a stale or unfinished check can't silently count as permission. Choosing a row still rechecks live access at that moment (fix(desktop): check access again when you select or pin an @ mention #7196), and publication revalidates again.
  • No false readiness. While a people search is still unfinished, the list does not present itself as ready.

Part of the mention-chooser stack on the shared #7190 recovery prerequisite: #7190#7196#7323#7197#7239#7240. This feature stack remains separate from #7191#7192. This PR builds directly on #7197.

Related issue

Continues the merged mention-editor work from #7124 (authorize remote mentions at publication) and #7128 (preserve spacing after multi-word mentions). No separate tracking issue for this slice.

Testing

  • Unit tests: mentionPresentation.test.mjs and MentionAutocomplete.test.mjs cover the status labels, in-place transitions, request-bound retry, and the 5-second verification expiry; mentionAdmissionJourney.test.mjs adds the presentation/admission journey.
  • Browser tests: mention-picker.spec.ts and mentions.spec.ts cover live status, reason, and presence on stable rows, explicit Retry issuing a fresh request, verification expiry, and no readiness while a people search is unfinished.
  • docs/mention-editor.md documents the availability-label behavior.

Historical capture state (not these heads)

The following original captions/links are retained as historical capture evidence only; none is relabeled as this restack.

Preserved action-label comparison

Historical mock-bridge captures from PR5 0426fac7 and PR6 22b1d536. These still illustrate the action labels (the new stable-list lifecycle is different); they are not screenshots of the repaired publication heads. Different background messages and tray heights make this a behavior comparison, not an identical-background pixel comparison. Images do not prove authorization or delivery.

Before — available agent only

At PR5 0426fac7, only the available agent appears.
before-actions

After — available actions and unresolved members

At PR6 22b1d536, channel members with denied or unresolved access remain visible as Unavailable or Checking access…, beside Invite….
after-actions

Integrated stable-picker visuals

Captured integrated f638b9cbnot standalone PR5 and not a capture of this correction. These still illustrate stable rows, action labels and next-open ranking; the earlier correction changed null-destination readiness and fixtures, not those pictured channel states. The duplicate-row image is before Tab, as captioned. No image proves access or delivery.

  • Earlier independent-root evidence is historical; current shared-recovery composition validation is recorded below.

Extraction validation update

  • This stack builds on the shared fix(desktop): keep your draft editable when an @ mention cannot be sent #7190 recovery baseline, separately from fix(desktop): refresh @ search when channel membership changes #7191fix(desktop): show an agent in @ search after you add it to a channel #7192. Chooser, cold-error settlement and ranking production behavior are unchanged by the fixture repairs.
  • Desktop lint/format, TypeScript, explicit shared-base file-size checks and E2E builds pass. Targeted send-flow/mention-presentation checks pass. Earlier package 6035/6035 and isolated browser 8/8 remain historical evidence for unchanged semantic inputs, not fresh runs of this composition.
  • The fresh composition probe passed 7/8 initially. The Welcome failure was traced to mock parity: create dropped the starter team ID, and add-members omitted the normal membership event. The fixture now preserves team ID, deliberately seeds a same-name collision and delivers that event. Exactly three starter creates prove reuse. The original ambiguous-submit error, retained draft, no-publication and exact-current-starter completion assertions remain.
  • Welcome now passes separately on the earliest owning fix(desktop): check access again when you select or pin an @ mention #7196 prefix and final descendant with matching E2E builds. Removing only the fixture membership event fails the roster precondition; restoring it passes. This is not one combined clean eight-test run and does not establish a production freshness dependency on lane B.
  • Earlier full browser sweep remains 138/141, with separate separator corrections 2/2 and editor 4/4. No fresh full-suite or all-prefix runtime claim.
  • The initial-directory authorization test now holds the actual mock directory response until Loading and no-Quinn assertions finish, rather than spending a one-second delay during navigation. Releasing it passes; withholding release fails eventual visibility. Existing assertions and timeouts are unchanged.
  • Independent Welcome fixture review passed; independent held-directory fixture review also passed; earlier helper/shared-base and semantic reviews are retained.
  • Fixed the historical profile-hover CI timing failure in separate commit 3825f894, inherited by fix(desktop): order same-name agents using your recent choices #7240. The test now uses the existing animation helper after each hover, before sampling/comparing settled surfaces; exact CSS equality, screenshot and timeouts remain unchanged. Fresh real-browser complete spec 2/2 passed; a disposable wrong-profile-color probe still failed that equality, and a controlled in-flight channel transition reproduced the old .03-versus-.04 failure. Probes removed; no production styling changed. Desktop check/typecheck and fresh E2E build passed. This tiny delta was self-reviewed, not independently re-reviewed.
  • Historical pre-workflow-repair CI: run 34271014638 FAILURE at 3825f894d08acb5a12d609fbb100da7d982274f2. Core, Smoke 1–3 (including the repaired hover test), builds, relay and both integration shards passed; DCO passed and GitHub reports no merge conflict. Smoke 4 failed workflow-local-controls.spec.ts:267 (initial inspector-click timeout; built-in retries fail the geometry assertion at :297). The subsequently authorized fixture repair and new gates are recorded below.
  • Authorized workflow fixture repair is a separate, independently revertible commit 27593788, retaining the hover fix unchanged. It targets the actual message textarea during trigger-inspector exit, samples operator boxes together after bounded geometry settlement, and checks the original persisted trigger expression and message text before reopen. Original geometry relations, screenshots, trigger/message semantics and timeouts remain; no production code or snapshot changes. Self-reviewed small test-only delta (+39/-4).
  • Reused bounded local proof: corrected diagnostic 1/1 with executed saved-original-content and 416px geometry evidence; wrong-layout and wrong-saved-content controls each fail meaningful assertions (the earlier inert wrapper control is not counted). Affected full browser spec 11/12, not clean: Darwin template-variable snapshot differs by 438 pixels. Lint and application types pass; expanded fixture types show baseline-only errors. No repeat full-suite or controls.
  • Screenshot attribution: one executed unchanged-published-fixture control on fix(desktop): show whether you can mention or invite an agent #7239's prior 3825f894d08acb5a12d609fbb100da7d982274f2, same Darwin Playwright configuration and same production served artifact, also fails by 438 pixels. Actual, expected and diff PNGs are each byte-identical to candidate fullspec artifacts. This screenshot test does not call the modified helper and its setup/capture is unchanged. Local HTTP content was verified against all 459 JS/CSS/index files; repair tree is exactly the tested 2a8f9068e9748f7a908b77097c98097b6c91fc7f. This is an inherited Darwin baseline limitation, separate from target repair proof; official Linux CI remains the intended gate. No baseline update, threshold relaxation or icon hiding.
  • Current exact-head CI: run 34276689304 FAILURE (terminal) at 27593788c4f21a74b1ccb994b2e926bf69b5cfcd. Every other job passed — Desktop Core, Smoke 4 with the repaired workflow-local-controls suite fully green (including the previously failing structured-conditions test), Smokes 2–4, both integration shards, builds, DCO — except Smoke 1: the unrelated channels.spec.ts:1005 test "drops an expanded DM after the first message fails" timed out at line 1066 because a persistent "Message failed to send" error toast intercepted the send button for the full 30s on all three attempts (331 passed / 2 flaky / 2 skipped in the shard). That spec is untouched by this test-only change, and the identical test passed in 3.3s on fix(desktop): order same-name agents using your recent choices #7240's superset run 34276688671 eight minutes earlier — an environment flake, not a regression from this PR. DCO passes; GitHub reports MERGEABLE. No whole-stack ready/merge claim.

loganj added a commit that referenced this pull request Sep 2, 2026
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from eec6f58 to 8478cfa Compare September 2, 2026 16:33
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from d0b8a9e to 6b81a62 Compare September 2, 2026 16:33
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from 8478cfa to 3d9452a Compare September 3, 2026 00:48
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from 6b81a62 to 3d1a947 Compare September 3, 2026 01:13
@loganj

loganj commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

🤖

Stable-picker rewrite — integrated capture

Captured from exact integrated f638b9cb123decc8306b1efce5aadc0ce13b91eb (PR5–7), not the standalone PR5 prefix. Strict isolated Chromium/mock bridge; assets and served cwd verified. Later fixture-only corrections do not change these pixels. These images demonstrate UI state, not live-relay permission or delivery. Historical comparisons remain labelled historical in the PR body.

Live actions on stable rows

Invite is enabled; denied and unresolved known members are disabled Unavailable/Checking. The workflow subsequently checks five-second expiry and explicit Retry without identity/order movement.

after-actions

loganj added a commit that referenced this pull request Sep 3, 2026
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch 3 times, most recently from b0a4ecd to 1c9e2b0 Compare September 3, 2026 02:01
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from 30795ba to 6372d0e Compare September 4, 2026 11:17
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from 1c9e2b0 to 5e10b5d Compare September 4, 2026 11:17
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from 6372d0e to f8bbe95 Compare September 4, 2026 11:44
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from 5e10b5d to f10578c Compare September 4, 2026 11:44
@loganj loganj changed the title fix(desktop): Show whether you can mention or invite an agent fix(desktop): show whether you can mention or invite an agent Sep 8, 2026
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from 0c8a241 to cbde1a3 Compare September 8, 2026 17:33
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from f8bbe95 to 58b41ae Compare September 8, 2026 17:33
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch 2 times, most recently from 1f82f67 to bd20d08 Compare September 8, 2026 17:56
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from fa638cb to 4c9aaa8 Compare September 8, 2026 17:56
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from bd20d08 to 967a7a1 Compare September 8, 2026 17:58
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from 4c9aaa8 to b354256 Compare September 8, 2026 17:58
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from 967a7a1 to d53bc6a Compare September 8, 2026 18:24
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from b354256 to b326af3 Compare September 8, 2026 18:24
loganj and others added 2 commits September 8, 2026 14:50
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
@loganj
loganj force-pushed the fix/mention-publication-01594460-6 branch from d53bc6a to a6fb55d Compare September 8, 2026 18:50
@loganj
loganj force-pushed the fix/mention-picker-stack-5bd14d7a-5 branch from b326af3 to 0464384 Compare September 8, 2026 18:50
loganj and others added 2 commits September 8, 2026 15:47
Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Keep the outgoing trigger input separate from the new message textarea, sample match controls together after inspector settlement, and verify the persisted original trigger and step text before reopen.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant